<form class="layui-form" action="#" method="post">
    {empty name="template_params"}
    <div style="padding: 30px;" class="layui-form layui-form-pane"> <!-- 提示：如果你不想用form，你可以换成div等任何一个普通元素 -->
        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title">
                {volist name="template" id="vo"}
                <li {if condition='$key eq "remind_order_pay" '}class="layui-this "{/if} >{$vo.title}</li>
                {/volist}
            </ul>
            <div class="layui-tab-content">
                {volist name="template" id="vo" }

                {assign name="template_key" value="$key" /}

                <div {if condition='$template_key eq "remind_order_pay" '}class=" layui-tab-item layui-show "{else/} class=" layui-tab-item layui-show " {/if}>
                {volist name="vo.data" id="d"}
                <div class="layui-form-item">
                    <label class="layui-form-label">{$d.title}：</label>
                    <div class="layui-input-block">
                        <input type="text" name="setting[{$template_key}][{$d.code}]" required lay-verify="required" placeholder="请输入{$d.title}" autocomplete="off" class="layui-input">
                    </div>
                </div>
                {/volist}
            </div>
            {/volist}
        </div>
    </div>
    </div>
    {/empty}
    {notempty name="$template_params"}
    <div style="padding: 30px;" class="layui-form layui-form-pane"> <!-- 提示：如果你不想用form，你可以换成div等任何一个普通元素 -->
        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title">
                {volist name="template" id="vo"}
                <li {if condition='$key eq "remind_order_pay" '}class="layui-this "{/if} >{$vo.title}</li>
                {/volist}
            </ul>
            <div class="layui-tab-content">
                {volist name="template" id="vo" }

                {assign name="template_key" value="$key" /}

                <div {if condition='$template_key eq "remind_order_pay" '}class=" layui-tab-item layui-show "{else/} class=" layui-tab-item " {/if}>
                {volist name="vo.data" id="d"}
                <div class="layui-form-item">
                    <label class="layui-form-label">{$d.title}：</label>
                    <div class="layui-input-block">
                        <input type="text" name="setting[{$template_key}][{$d.code}]" required lay-verify="required" value="{$template_params[$template_key][$d.code]}" placeholder="请输入{$d.title}" autocomplete="off" class="layui-input">
                    </div>
                </div>
                {/volist}
            </div>
            {/volist}
        </div>
    </div>
    </div>
    {/notempty}
<script>
    layui.use('element', function () {
        //监听提交
        var $ = layui.jquery
            , element = layui.element;
    });
</script>
</form>